#include "stdafx.h" 
#include "cPlayer.h"
#include "DirectInput.h"

cPlayer::cPlayer(void)
{
}

cPlayer::~cPlayer(void)
{
}

void cPlayer::init(float x, float y, float z)
{
   setPosition(D3DXVECTOR3( x, y, z ));

	D3DXMatrixRotationY(&mOrigin, D3DX_PI);
}

void cPlayer::release()
{
	mPlayerModel.release();
	mModel = NULL;
}

void cPlayer::update()
{
	D3DXVECTOR3 rightDir(1.f,0.f,0.f);
	if( gDInput->keyDown(DIK_RIGHTARROW))
		mPosition += (rightDir*0.01f);
	if( gDInput->keyDown(DIK_LEFTARROW))
		mPosition -= (rightDir*0.01f);
}
